/**
 * @Description: vite配置
 * @Author BPF
 * @create 2021/1/3 17:26
 */
import { defineConfig } from 'vite'
import viteDefaultConfig from './vite.config'
import { visualizer } from 'rollup-plugin-visualizer'

export default defineConfig(configEnv => {
  const _viteDefaultConfig = viteDefaultConfig(configEnv)
  return {
    ..._viteDefaultConfig,
    plugins: [
      ..._viteDefaultConfig.plugins,
      visualizer({ filename: 'rollup-analyzer.html', open: true, gzipSize: true, brotliSize: true })
    ]
  }
})
